package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"varchar(30)" json:"username"`
	Password string `gorm:"varchar(30)" json:"password"`
}

// 用户与角色关系表
type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type：int"`
}

// 角色表
type Role struct {
	gorm.Model
	RoleName string `gorm:"varchar(30)" json:"roleName"`
}

// 角色和权限关系表
type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}

// Node权限表
type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(50)"`
}
type WbList struct {
	gorm.Model
	Title   string `gorm:"varchar(30)" json:"title"`
	Content string `gorm:"varchar(30)" json:"content"`
}
